<ion-view view-title="交易记录">
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content class="trade-log" ng-class="{'has-loading': isOffline}">

        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>

        <div ng-class="{'expand':param.isExpand0,'panel':true}">
            <time class="item" ng-click="param.isExpand0=!param.isExpand0;expand()"><i class="icon_date"></i>{{param.curMon}}</time>
            <dl ng-if="curOrders.length == 0"><dt><i class="icon_cGotone"></i>本月没有交易记录</time></dt></dl>
            <dl ng-repeat="record in curOrders">
                <a ng-href="{{record.url}}">
                    <dt>{{record.prod_name}}<time>{{record.entrust_time}}</time></dt>
                    <dd>
                        <ul class="clearfix">
                            <li>{{record.buyOrSell=="0" ? "购买金额(元)" : "卖出份额(份)"}}<em class="amount">{{record.entrust_balance}}</em></li>
                            <li>交易状态<em class="{{record.success_class}}">{{record.entrust_status_name}}</em></li>
                        </ul>
                    </dd>
                    <time ng-show="param.redirect_url" class="ng-hide">
                        <a ng-show="param.redirect_url" ng-click="changeUrl(param.redirect_url)" class="btn">更多</a>
                    </time>
                </a>
            </dl>
        </div>
        <div ng-class="{'expand':param.isExpand1,'panel':true}" ng-if="preMon1Orders.length > 0">
            <time class="item" ng-click="param.isExpand1=!param.isExpand1;expand()"><i class="icon_date"></i>{{param.preMon1}}</time>
            <dl ng-repeat="record in preMon1Orders">
                <a href="{{record.url}}">
                    <dt>{{record.prod_name}}<time>{{record.entrust_time}}</time></dt>
                    <dd>
                        <ul class="clearfix">
                            <li>{{record.buyOrSell=="0" ? "购买金额(元)" : "卖出份额(份)"}}<em class="amount">{{record.entrust_balance}}</em></li>
                            <li>交易状态<em class="{{record.success_class}}">{{record.entrust_status_name}}</em></li>
                        </ul>
                    </dd>
                    <time ng-show="param.redirect_url" class="ng-hide">
                        <a ng-show="param.redirect_url" ng-click="changeUrl(param.redirect_url)" class="btn">更多</a>
                    </time>
                </a>
            </dl>
        </div>
        <div ng-class="{'expand':param.isExpand2,'panel':true}" ng-if="preMon2Orders.length > 0">
            <time class="item" ng-click="param.isExpand2=!param.isExpand2;expand()"><i class="icon_date"></i>{{param.preMon2}}</time>
            <dl ng-repeat="record in preMon2Orders">
                <a href="{{record.url}}">
                    <dt>{{record.prod_name}}<time>{{record.entrust_time}}</time></dt>
                    <dd>
                        <ul class="clearfix">
                            <li>{{record.buyOrSell=="0" ? "购买金额(元)" : "卖出份额(份)"}}<em class="amount">{{record.entrust_balance}}</em></li>
                            <li>交易状态<em class="{{record.success_class}}">{{record.entrust_status_name}}</em></li>
                        </ul>
                    </dd>
                    <time ng-show="param.redirect_url" class="ng-hide">
                        <a ng-show="param.redirect_url" ng-click="changeUrl(param.redirect_url)" class="btn">更多</a>
                    </time>
                </a>
            </dl>
        </div>
    </ion-content>
</ion-view>